testCase40='DBshop040_搜索查询流程'
import  time
from public.action import *
from public.testData import *
from public.tools import*
from public.business import *
firefox=openBrowser(urlAdmin)
DBshopLoginAdmin(firefox)
DBshopEnterMenu3(firefox,'客户管理','客户余额','充值记录')#进入三级菜单充值记录

# "1.点击被充值人输入“cyy”，点击“搜索”按钮。
# 2.成功搜索cyy的充值记录。"

firefox.find_element_by_name('user_name').send_keys(userName)#查找messi

firefox.find_element_by_xpath('//button[@type="submit"]').click() #点击搜索
time.sleep(4)



try:
    firefox.find_element_by_xpath('//td[text()="%s"]'%userName).is_displayed()
    writeLog('%s 测试通过' % testCase40)
except:
    writeLog('%s 测试不通过' % testCase40)
    getPhoto(firefox)
firefox.quit()

